﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:XamlingCore_SL_Controls_Content="clr-namespace:XamlingCore.SL.Controls.Content;assembly=XamlingCore.SL.Controls" xmlns:XamlingCore_SL_Controls_Navigation="clr-namespace:XamlingCore.SL.Controls.Navigation;assembly=XamlingCore.SL.Controls" xmlns:Template="clr-namespace:FlickrSample.Template" xmlns:System="clr-namespace:System;assembly=mscorlib" x:Class="FlickrSample.App"
			 >
	<Application.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/XamlingCore.SL.Styles;component/ScrollBar/ScrolLBarDictionary.xaml"/>

			</ResourceDictionary.MergedDictionaries>

			<Template:ContentTemplateSelector x:Key="ContentTemplateSelector"/>
			<SolidColorBrush x:Key="ColorA" Color="#FFFF3211"/>
			<SolidColorBrush x:Key="ColorB" Color="#FFF14017"/>
			<Style x:Key="PhoneTransitionTemplate" TargetType="XamlingCore_SL_Controls_Navigation:XNavigationFrame">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="XamlingCore_SL_Controls_Navigation:XNavigationFrame">
							<XamlingCore_SL_Controls_Content:XTransitionContentControl x:Name="TransControl"
								ReverseTransition="{Binding NavigationService.IsReverseNavigation}"  
								Content="{Binding NavigationService.CurrentContentObject}" 
								TransitionsEnabled="{Binding TransitionsEnabled}"
								VerticalAlignment="Stretch" 
								HorizontalAlignment="Stretch" Style="{StaticResource PhoneTransitionContentPresenterTemplate}"
																				  TemplateSelector="{TemplateBinding ContentTemplateSelector}"
																				   />
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="PhoneTransitionContentPresenterTemplate" TargetType="XamlingCore_SL_Controls_Content:XTransitionContentControl">

				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="XamlingCore_SL_Controls_Content:XTransitionContentControl">
							<Grid>
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="ContentStates">
										<VisualStateGroup.Transitions>
											<VisualTransition GeneratedDuration="0">
												<VisualTransition.GeneratedEasingFunction>
													<CubicEase EasingMode="EaseIn"/>
												</VisualTransition.GeneratedEasingFunction>
											</VisualTransition>
											<VisualTransition GeneratedDuration="0" To="BeforeTransition"/>
											<VisualTransition GeneratedDuration="0" To="BeforeTransitionReverse"/>
										</VisualStateGroup.Transitions>
										<VisualState x:Name="NoContent">
											<Storyboard>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="oldContentPresenter">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Collapsed</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
												<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="oldContentPresenter" />
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="contentPresenter">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Collapsed</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
												<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" />
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Normal">

											<Storyboard>
												<DoubleAnimation Duration="0:0:0.5" To="77" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="oldContentPresenter" >
													<DoubleAnimation.EasingFunction>
														<CubicEase EasingMode="EaseIn"/>
													</DoubleAnimation.EasingFunction>
												</DoubleAnimation>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="contentPresenter">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Visible</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
													<DiscreteObjectKeyFrame KeyTime="0:0:0.5">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Visible</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
												<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="contentPresenter">
													<EasingDoubleKeyFrame KeyTime="0" Value="90">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
													<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="90">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
													<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
												</DoubleAnimationUsingKeyFrames>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="oldContentPresenter">
													<DiscreteObjectKeyFrame KeyTime="0:0:0.5">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Collapsed</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
												<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter">
													<EasingDoubleKeyFrame KeyTime="0" Value="0">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
													<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
													<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
												</DoubleAnimationUsingKeyFrames>
												<DoubleAnimation Duration="0:0:0.5" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="oldContentPresenter" >
													<DoubleAnimation.EasingFunction>
														<CubicEase EasingMode="EaseIn"/>
													</DoubleAnimation.EasingFunction>
												</DoubleAnimation>
												<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="contentPresenter">
													<EasingDoubleKeyFrame KeyTime="0" Value="1">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
													<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
												</DoubleAnimationUsingKeyFrames>
												<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="oldContentPresenter">
													<EasingDoubleKeyFrame KeyTime="0" Value="0">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseIn"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
													<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseIn"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
												</DoubleAnimationUsingKeyFrames>
											</Storyboard>

										</VisualState>
										<VisualState x:Name="BeforeTransition">
											<Storyboard>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="contentPresenter" />
												<DoubleAnimation Duration="0" To="90" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="contentPresenter" />
												<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" />
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="contentPresenter">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Visible</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
												<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="oldContentPresenter" />
											</Storyboard>
										</VisualState>
										<VisualState x:Name="NormalReverse">

											<Storyboard>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="oldContentPresenter">
													<DiscreteObjectKeyFrame KeyTime="0:0:0.5">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Collapsed</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
												<DoubleAnimation Duration="0:0:0.5" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="oldContentPresenter" >
													<DoubleAnimation.EasingFunction>
														<CubicEase EasingMode="EaseIn"/>
													</DoubleAnimation.EasingFunction>
												</DoubleAnimation>
												<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="oldContentPresenter">
													<EasingDoubleKeyFrame KeyTime="0" Value="1">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseIn"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
													<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseIn"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
												</DoubleAnimationUsingKeyFrames>
												<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="oldContentPresenter">
													<EasingDoubleKeyFrame KeyTime="0" Value="0">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseIn"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
													<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="90">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseIn"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
												</DoubleAnimationUsingKeyFrames>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="contentPresenter">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Visible</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
												<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter">
													<EasingDoubleKeyFrame KeyTime="0" Value="0">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
													<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
													<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
												</DoubleAnimationUsingKeyFrames>
												<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="contentPresenter" >
													<DoubleAnimation.EasingFunction>
														<CubicEase EasingMode="EaseOut"/>
													</DoubleAnimation.EasingFunction>
												</DoubleAnimation>
												<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="contentPresenter">
													<EasingDoubleKeyFrame KeyTime="0" Value="77">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
													<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="77">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
													<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0">
														<EasingDoubleKeyFrame.EasingFunction>
															<CubicEase EasingMode="EaseOut"/>
														</EasingDoubleKeyFrame.EasingFunction>
													</EasingDoubleKeyFrame>
												</DoubleAnimationUsingKeyFrames>
											</Storyboard>

										</VisualState>
										<VisualState x:Name="BeforeTransitionReverse">
											<Storyboard>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="oldContentPresenter" />
												<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" />
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="contentPresenter">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Visible</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
												<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="contentPresenter" />
												<DoubleAnimation Duration="0" To="90" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="contentPresenter" />
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="VisualStateGroup"/>
								</VisualStateManager.VisualStateGroups>
								<ContentPresenter x:Name="oldContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" RenderTransformOrigin="0.5,0.5" CacheMode="BitmapCache">
									<ContentPresenter.RenderTransform>
										<CompositeTransform/>
									</ContentPresenter.RenderTransform>
									<ContentPresenter.Projection>
										<PlaneProjection CenterOfRotationX="0"/>
									</ContentPresenter.Projection>
								</ContentPresenter>
								<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" RenderTransformOrigin="0.5,0.5" CacheMode="BitmapCache">
									<ContentPresenter.RenderTransform>
										<CompositeTransform/>
									</ContentPresenter.RenderTransform>
									<ContentPresenter.Projection>
										<PlaneProjection CenterOfRotationX="1"/>
									</ContentPresenter.Projection>
								</ContentPresenter>

							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>

			<Style x:Key="NiceBlackButton" TargetType="Button">
				<Setter Property="Background">
					<Setter.Value>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FF2D2D2D" Offset="0"/>
							<GradientStop Color="Black" Offset="1"/>
							<GradientStop Color="#FF252525" Offset="0.534"/>
							<GradientStop Color="#FF313131" Offset="0.513"/>
						</LinearGradientBrush>
					</Setter.Value>
				</Setter>
				<Setter Property="Foreground" Value="White"/>
				<Setter Property="Padding" Value="3"/>
				<Setter Property="BorderThickness" Value="1"/>
				<Setter Property="BorderBrush" Value="#FF4D4D4D"/>
				<Setter Property="Width" Value="80"/>
				<Setter Property="Height" Value="40"/>

				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="Button">
							<Grid>
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates">
										<VisualState x:Name="Normal">
											<Storyboard>
												<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border" />
											</Storyboard>
										</VisualState>
										<VisualState x:Name="MouseOver">
											<Storyboard>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border" />
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Pressed"/>
										<VisualState x:Name="Disabled">
											<Storyboard>
												<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="FocusStates">
										<VisualState x:Name="Focused">
											<Storyboard>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Unfocused"/>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Background="{TemplateBinding Background}" CornerRadius="5"/>
								<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
								<Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
								<Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#34FFFFFF" StrokeThickness="1"/>
								<Border x:Name="border" BorderThickness="1" Background="#19FFFFFF" Opacity="0"/>
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>


			<Style x:Key="NiceButton" TargetType="Button">
				<Setter Property="Background" Value="#FF1F3B53"/>
				<Setter Property="Foreground" Value="#FF000000"/>
				<Setter Property="Padding" Value="3"/>
				<Setter Property="BorderThickness" Value="1"/>
				<Setter Property="BorderBrush">
					<Setter.Value>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FFA3AEB9" Offset="0"/>
							<GradientStop Color="#FF8399A9" Offset="0.375"/>
							<GradientStop Color="#FF718597" Offset="0.375"/>
							<GradientStop Color="#FF617584" Offset="1"/>
						</LinearGradientBrush>
					</Setter.Value>
				</Setter>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="Button">
							<Grid>
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates">
										<VisualState x:Name="Normal">
											<Storyboard>
												<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border" />
											</Storyboard>
										</VisualState>
										<VisualState x:Name="MouseOver">
											<Storyboard>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border" />
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Pressed"/>
										<VisualState x:Name="Disabled">
											<Storyboard>
												<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="FocusStates">
										<VisualState x:Name="Focused">
											<Storyboard>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Unfocused"/>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Background="{TemplateBinding Background}" CornerRadius="5"/>
								<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
								<Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
								<Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#34FFFFFF" StrokeThickness="1"/>
								<Border x:Name="border" BorderThickness="1" Background="#19FFFFFF" Opacity="0"/>
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="NoHighlightTextBox" TargetType="TextBox">
				<Setter Property="BorderThickness" Value="1"/>
				<Setter Property="Background" Value="#FFFFFFFF"/>
				<Setter Property="Foreground" Value="#FF000000"/>
				<Setter Property="Padding" Value="2"/>
				<Setter Property="BorderBrush">
					<Setter.Value>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FFA3AEB9" Offset="0"/>
							<GradientStop Color="#FF8399A9" Offset="0.375"/>
							<GradientStop Color="#FF718597" Offset="0.375"/>
							<GradientStop Color="#FF617584" Offset="1"/>
						</LinearGradientBrush>
					</Setter.Value>
				</Setter>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="TextBox">
							<Grid x:Name="RootElement">
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates">
										<VisualState x:Name="Normal"/>
										<VisualState x:Name="MouseOver"/>
										<VisualState x:Name="Disabled"/>
										<VisualState x:Name="ReadOnly">
											<Storyboard>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ReadOnlyVisualElement"/>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="FocusStates">
										<VisualState x:Name="Focused">
											<Storyboard>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Unfocused">
											<Storyboard>
												<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="ValidationStates">
										<VisualState x:Name="Valid"/>
										<VisualState x:Name="InvalidUnfocused">
											<Storyboard>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Visible</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="InvalidFocused">
											<Storyboard>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Visible</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="validationTooltip">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<System:Boolean>True</System:Boolean>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1" Opacity="1">
									<Grid>
										<Border x:Name="ReadOnlyVisualElement" Background="#5EC9C9C9" Opacity="0"/>
										<Border x:Name="MouseOverBorder" BorderBrush="{x:Null}" BorderThickness="1">
											<ScrollViewer x:Name="ContentElement" BorderThickness="0" IsTabStop="False" Padding="{TemplateBinding Padding}"/>
										</Border>
									</Grid>
								</Border>
								<Border x:Name="FocusVisualElement" BorderBrush="#FF6DBDD1" BorderThickness="{TemplateBinding BorderThickness}" IsHitTestVisible="False" Margin="1" Opacity="0" Visibility="Collapsed"/>
								<Border x:Name="ValidationErrorElement" BorderBrush="#FFDB000C" BorderThickness="1" CornerRadius="1" Visibility="Collapsed">
									<ToolTipService.ToolTip>
										<ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}">
											<ToolTip.Triggers>
												<EventTrigger RoutedEvent="Canvas.Loaded">
													<BeginStoryboard>
														<Storyboard>
															<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
																<DiscreteObjectKeyFrame KeyTime="0">
																	<DiscreteObjectKeyFrame.Value>
																		<System:Boolean>true</System:Boolean>
																	</DiscreteObjectKeyFrame.Value>
																</DiscreteObjectKeyFrame>
															</ObjectAnimationUsingKeyFrames>
														</Storyboard>
													</BeginStoryboard>
												</EventTrigger>
											</ToolTip.Triggers>
										</ToolTip>
									</ToolTipService.ToolTip>
									<Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12">
										<Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="#FFDC000C" Margin="1,3,0,0"/>
										<Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#ffffff" Margin="1,3,0,0"/>
									</Grid>
								</Border>
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>

			<ControlTemplate x:Key="ValidationToolTipTemplate">
				<Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
					<Grid.RenderTransform>
						<TranslateTransform x:Name="xform" X="-25"/>
					</Grid.RenderTransform>
					<VisualStateManager.VisualStateGroups>
						<VisualStateGroup x:Name="OpenStates">
							<VisualStateGroup.Transitions>
								<VisualTransition GeneratedDuration="0"/>
								<VisualTransition GeneratedDuration="0:0:0.2" To="Open">
									<Storyboard>
										<DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform">
											<DoubleAnimation.EasingFunction>
												<BackEase Amplitude=".3" EasingMode="EaseOut"/>
											</DoubleAnimation.EasingFunction>
										</DoubleAnimation>
										<DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
									</Storyboard>
								</VisualTransition>
							</VisualStateGroup.Transitions>
							<VisualState x:Name="Closed">
								<Storyboard>
									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
								</Storyboard>
							</VisualState>
							<VisualState x:Name="Open">
								<Storyboard>
									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform"/>
									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
								</Storyboard>
							</VisualState>
						</VisualStateGroup>
					</VisualStateManager.VisualStateGroups>
					<Border Background="#052A2E31" CornerRadius="5" Margin="4,4,-4,-4"/>
					<Border Background="#152A2E31" CornerRadius="4" Margin="3,3,-3,-3"/>
					<Border Background="#252A2E31" CornerRadius="3" Margin="2,2,-2,-2"/>
					<Border Background="#352A2E31" CornerRadius="2" Margin="1,1,-1,-1"/>
					<Border Background="#FFDC000C" CornerRadius="2"/>
					<Border CornerRadius="2">
						<TextBlock Foreground="White" MaxWidth="250" Margin="8,4,8,4" TextWrapping="Wrap" Text="{Binding (Validation.Errors)[0].ErrorContent}" UseLayoutRounding="false"/>
					</Border>
				</Grid>
			</ControlTemplate>


			<Style x:Key="TitleTextBlock" TargetType="TextBlock">
				<Setter Property="FontFamily" Value="Segoe UI Light"/>
				<Setter Property="FontSize" Value="48"/>
				<Setter Property="Foreground" Value="White"/>
			</Style>

			<Style x:Key="NormalTextBlock" TargetType="TextBlock">
				<Setter Property="FontFamily" Value="Segoe UI Light"/>
				<Setter Property="FontSize" Value="24"/>
				<Setter Property="Foreground" Value="White"/>
			</Style>

			<Style x:Key="LoadContentControlTemplate" TargetType="XamlingCore_SL_Controls_Content:XTransitionContentControl">
				<Setter Property="Foreground" Value="#FF000000"/>
				<Setter Property="HorizontalContentAlignment" Value="Left"/>
				<Setter Property="VerticalContentAlignment" Value="Top"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="XamlingCore_SL_Controls_Content:XTransitionContentControl">
							<Grid x:Name="grid">
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="ContentStates">
										<VisualStateGroup.Transitions>
											<VisualTransition GeneratedDuration="0:0:0.3"/>
										</VisualStateGroup.Transitions>
										<VisualState x:Name="NormalReverse"/>
										<VisualState x:Name="BeforeTransition"/>
										<VisualState x:Name="Normal"/>
										<VisualState x:Name="BeforeTransitionReverse"/>
										<VisualState x:Name="NoContent">
											<Storyboard>
												<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid" />
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grid">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Collapsed</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<ContentPresenter Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}"/>
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="CommonListItemContainerStyle" TargetType="ListBoxItem">
				<Setter Property="Padding" Value="3"/>
				<Setter Property="HorizontalContentAlignment" Value="Left"/>
				<Setter Property="VerticalContentAlignment" Value="Top"/>
				<Setter Property="Background" Value="Transparent"/>
				<Setter Property="BorderThickness" Value="1"/>
				<Setter Property="TabNavigation" Value="Local"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="ListBoxItem">
							<Grid Background="{TemplateBinding Background}">
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates">
										<VisualState x:Name="Normal"/>
										<VisualState x:Name="MouseOver">
											<Storyboard>
												<DoubleAnimation Duration="0" To=".35" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="fillColor"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Disabled">
											<Storyboard>
												<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="SelectionStates">
										<VisualState x:Name="Unselected"/>
										<VisualState x:Name="Selected">
											<Storyboard>
												<DoubleAnimation Duration="0" To=".75" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="fillColor2"/>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="FocusStates">
										<VisualState x:Name="Focused">
											<Storyboard>
												<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Visible</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Unfocused"/>
									</VisualStateGroup>
									<VisualStateGroup x:Name="LayoutStates">
										<VisualState x:Name="AfterLoaded"/>
										<VisualState x:Name="BeforeLoaded"/>
										<VisualState x:Name="BeforeUnloaded"/>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<Rectangle x:Name="fillColor" Fill="{StaticResource ColorA}" IsHitTestVisible="False" Opacity="0" RadiusY="1" RadiusX="1"/>
								<Rectangle x:Name="fillColor2" Fill="{StaticResource ColorB}" IsHitTestVisible="False" Opacity="0" RadiusY="1" RadiusX="1"/>
								<Border>
									<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Height="40"/>
								</Border>

								<Rectangle x:Name="FocusVisualElement" RadiusY="1" RadiusX="1" StrokeThickness="1" Visibility="Collapsed"/>
								<Border BorderBrush="#FF7E7E7E" BorderThickness="0,0,0,1"/>
								<Border BorderBrush="#FF2D2D2D" BorderThickness="0,0,0,1" Margin="0,0,0,1"/>                                
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>

			<Style x:Key="ListBoxTextStyle" TargetType="TextBlock">
				<Setter Property="FontSize" Value="12"/>
				<Setter Property="VerticalAlignment" Value="Center"/>
				<Setter Property="Foreground" Value="#FFD6D6D6"/>
				<Setter Property="FontFamily" Value="Arial"/>
				<Setter Property="FontWeight" Value="Black"/>
			</Style>

			<Style x:Key="NiceListbox" TargetType="ListBox">
				<Setter Property="Padding" Value="1"/>
				<Setter Property="Background" Value="#FFFFFFFF"/>
				<Setter Property="Foreground" Value="#FF000000"/>
				<Setter Property="HorizontalContentAlignment" Value="Left"/>
				<Setter Property="VerticalContentAlignment" Value="Top"/>
				<Setter Property="IsTabStop" Value="False"/>
				<Setter Property="BorderThickness" Value="0"/>
				<Setter Property="BorderBrush" Value="{x:Null}"/>
				<Setter Property="TabNavigation" Value="Once"/>
				<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
				<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
				<Setter Property="ItemContainerStyle" Value="{StaticResource CommonListItemContainerStyle}"/>
				<Setter Property="BorderBrush">
					<Setter.Value>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FFA3AEB9" Offset="0"/>
							<GradientStop Color="#FF8399A9" Offset="0.375"/>
							<GradientStop Color="#FF718597" Offset="0.375"/>
							<GradientStop Color="#FF617584" Offset="1"/>
						</LinearGradientBrush>
					</Setter.Value>
				</Setter>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="ListBox">
							<Grid>
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="ValidationStates">
										<VisualState x:Name="Valid"/>
										<VisualState x:Name="InvalidUnfocused">
											<Storyboard>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Visible</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="InvalidFocused">
											<Storyboard>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Visibility>Visible</Visibility>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="validationTooltip">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<System:Boolean>True</System:Boolean>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
									<ScrollViewer x:Name="ScrollViewer" BorderBrush="Transparent" BorderThickness="0" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" TabNavigation="{TemplateBinding TabNavigation}" Style="{StaticResource NiceScollViewer}">
										<ItemsPresenter/>
									</ScrollViewer>
								</Border>
								<Border x:Name="ValidationErrorElement" BorderBrush="#FFDB000C" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" Visibility="Collapsed">
									<ToolTipService.ToolTip>
										<ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}">
											<ToolTip.Triggers>
												<EventTrigger RoutedEvent="Canvas.Loaded">
													<BeginStoryboard>
														<Storyboard>
															<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
																<DiscreteObjectKeyFrame KeyTime="0">
																	<DiscreteObjectKeyFrame.Value>
																		<System:Boolean>true</System:Boolean>
																	</DiscreteObjectKeyFrame.Value>
																</DiscreteObjectKeyFrame>
															</ObjectAnimationUsingKeyFrames>
														</Storyboard>
													</BeginStoryboard>
												</EventTrigger>
											</ToolTip.Triggers>
										</ToolTip>
									</ToolTipService.ToolTip>
									<Grid Background="Transparent" HorizontalAlignment="Right" Height="10" Margin="0,-4,-4,0" VerticalAlignment="Top" Width="10">
										<Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="#FFDC000C" Margin="-1,3,0,0"/>
										<Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#ffffff" Margin="-1,3,0,0"/>
									</Grid>
								</Border>
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>

		</ResourceDictionary>

	</Application.Resources>
</Application>
